{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页</title>
    <link type="text/css" rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.css' %}">
    <script type="text/javascript" src="{% static 'bootstrap/js/jquery-2.0.2.min.js' %}"></script>
    <script type="text/javascript" src="{% static 'bootstrap/js/bootstrap.js' %}"></script>
    <style>
        #login_box {
            width: 400px;
            height: 300px;
            margin-top: 200px;
            box-shadow: 0 0 25px #ccc;
            border-radius: 20px;
        }

        h3 {
            text-align: center;
            margin-bottom: 30px;
        }
    </style>
</head>
<body>

<div class="container" id="login_box">
    <h3>后台登录</h3>
    <form action="{% url 'user_login' %}" method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" class="form-control" name="username" id="username" placeholder="请输入用户名">
        </div>
        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" class="form-control" name="password" id="password" placeholder="请输入密码">
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
    <span style="color: red">{{ error }}</span>
</div>

</body>
</html>